<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://www.hx.com/tags" prefix="hx" %>
<%   String path = request.getContextPath();   
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
	<title>无标题文档</title>
	<link href="css/style.css" rel="stylesheet" type="text/css">
	<meta name="viewport" content="width=device-width, initial-scale=1.0,,user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="http://v3.bootcss.com/favicon.ico">
    <link href="/bootstrapDemo/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="/bootstrapDemo/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
     <script src="/bootstrapDemo/js/jquery.js"></script>
 	<script src="/bootstrapDemo/bootstrap/js/bootstrap.min.js"></script>
 	<script src="/bootTest/js/my.js"></script>
	<hx:ajax jquery="true"/>
	<style type="text/css">
		body{
			background-color: white;
		}
		a:HOVER {
				color: red;
			}
	</style>
	<script type="text/javascript">
		function duijiangAjax(id){
			$hx.service("awa.updateResultAjax",[id],function(result2){
				if(result2){
					top.document.getElementById("mainFrame").src="<%=basePath%>/award/getReList.action";
				}else{
					alert("删除失败！");
				}
			});
		}
	</script>
	</head>
	<body>
		<ol class="breadcrumb">
		  <li class="active">中奖信息管理</li>
		</ol>
		<div>
			
		</div>
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			class="thetable" style="font-size: 13px;margin-top: 10px;">
			<tr align="center">
				<td colspan="6">
			      <div style="width: 95%;background-color:#F0F0F0;" class="panel panel-default">
			      	<div class="panel-heading" style="text-align: left">信息列表
				    </div>
				  	<table class="table table-bordered" style="font-size: 12px;text-align: center;">
				  		<tr style="background-color: #eee;border: 0" >
							<td >序号</td>
							<td >活动类型</td>
							<td >中奖用户</td>
							<td >手机号码</td>		
							<td >中奖时间</td>		
							<td >奖项</td>		
							<td >兑换码</td>		
							<td >状态</td>		
							<td >操作</td>		
						 </tr>
				  		<s:iterator value="resultList" id="resu" status="statu">
						 	 <tr onMouseOut="this.style.background='#fff'"
					onMouseOver="this.style.background='#F4E088'" style="background-color: #fff;">
								<td><s:property value="#statu.index+1"/></td>
								<td ><s:property value="#resu.ptype"/></td>		
								<td ><s:property value="#resu.userName"/></td>		
								<td ><s:property value="#resu.phone"/></td>		
								<td ><s:date name="%{#resu.addTime}"	 format="yyyy-MM-dd hh:mm:ss" /> </td>		
								<td ><s:property value="#resu.prized"/></td>		
								<td ><s:property value="#resu.scno"/></td>		
								<td ><s:property value="#resu.pstate"/></td>		
								<td >
								<s:if test="#resu.pstate=='未兑奖'">
								<button type="button" class="btn btn-danger" style="height: 20px;line-height: 8px;" onclick="duijiangAjax('<s:property value="#resu.id"/>')">兑奖</button>
								</s:if>
								<s:else>
								<button type="button" class="btn btn-default" style="height: 20px;line-height: 8px;" onclick="">已兑奖</button>
								</s:else>
								</td>		
							 </tr>

						 </s:iterator>
					  </table>
					</div>
				</td>
			</tr>
			<tr align="center" style="background-color: #cccccc;height: 30px;line-height: 30px;font-size: 14px;font-weight: bold;cursor: pointer;">
				<td colspan="2">当前第${pageData.startPage}页      共${pageData.totlePage}页</td>
				<td><a href="<%=basePath%>/award/getReList.action?currentPage=${pageData.currentPage-1}">上一页</a>   <a href="<%=basePath%>/award/getReList.action?currentPage=${pageData.currentPage+1}">下一页</a></td>
				<td></td>
				<td colspan="2">当前第${pageData.startNum}-${pageData.endNum}条    共${pageData.totle}条</td>
			</tr>
		</table>
	</body>
</html>

